package com.zdzx.model.service.base.result;

import java.math.BigDecimal;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class IndexPay {

	private BigDecimal sum;
	private BigDecimal course;
	private BigDecimal vip;
	
	public void setCourse(BigDecimal course) {
		if(course!=null)
		this.course=course.setScale(2, BigDecimal.ROUND_HALF_UP);
		else
		course=new BigDecimal("0.00");
	}
	
	
	public void setSum(BigDecimal sum) {
		if(sum!=null)
		this.sum=sum.setScale(2, BigDecimal.ROUND_HALF_UP);
		else
		sum=new BigDecimal("0.00");
	}
	
	public void setVip(BigDecimal vip) {
		if(vip!=null)
		this.vip=vip.setScale(2, BigDecimal.ROUND_HALF_UP);
		else
			vip=new BigDecimal("0.00");
	}
	
	
}
